﻿
#include "Engine/common.h"
#include "Engine/uimgr.h"
#include "Engine/ControlDef.h"
#include "strid.h"
#include "DNF定义.h"
#include "AppUI.h"

CImage* Ctrl冷却详情面板;

//大小380*760
void 详细构建_冷却详情面板(int PageId,CImage* Ctrl冷却详情面板)
{
	::Ctrl冷却详情面板=Ctrl冷却详情面板;

	Ctrl冷却详情面板->SetImage(EasyLoadImageR(RID_冷却详情背景));

	SetCreateControlParam(24,47,Ctrl冷却详情面板,PageId_Setting);
	CVScrollView* Ctrl信息列表视图=EasyCreateScrollView(CID_冷却_信息列表视图,315+16,38*18,38*20);
	int BlockPosX[5]={0,63,126,189,252};
	int BlockWidth=63;
	int LineHeight=38;
	int LabelHeight=CLineLabel::MinHeight;

	for (int i=0;i<20;i++)
	{
		SetCreateControlParam(BlockPosX[0]+(BlockWidth-28)/2,i*LineHeight+(LineHeight-28)/2,Ctrl信息列表视图,PageId_Setting);
		CImage* Ctrl技能图标=EasyCreateImage(CID_冷却_技能图标+i,28,28);

		SetCreateControlParam(BlockPosX[1]+1,i*LineHeight+(LineHeight-LabelHeight)/2,Ctrl信息列表视图,PageId_Setting);
		CLineLabel* Ctrl技能原始时间=EasyCreateLineLabel(CID_冷却_技能原始时间+i,BlockWidth-2,LabelHeight,L"test");
		Ctrl技能原始时间->SetTextColor(0xFFFFFFFF);	
		Ctrl技能原始时间->SetAlign('-');

		SetCreateControlParam(BlockPosX[2]+1,i*LineHeight+(LineHeight-LabelHeight)/2,Ctrl信息列表视图,PageId_Setting);
		CLineLabel* Ctrl技能当前时间=EasyCreateLineLabel(CID_冷却_技能当前时间+i,BlockWidth-2,LabelHeight,L"test");
		Ctrl技能当前时间->SetTextColor(0xFFFFFFFF);	
		Ctrl技能当前时间->SetAlign('-');

		SetCreateControlParam(BlockPosX[3]+1,i*LineHeight+(LineHeight-LabelHeight)/2,Ctrl信息列表视图,PageId_Setting);
		CLineLabel* Ctrl技能缩减率=EasyCreateLineLabel(CID_冷却_技能缩减率+i,BlockWidth-2,LabelHeight,L"test");
		Ctrl技能缩减率->SetTextColor(0xFFFFFFFF);	
		Ctrl技能缩减率->SetAlign('-');

		SetCreateControlParam(BlockPosX[4]+1,i*LineHeight+(LineHeight-LabelHeight)/2,Ctrl信息列表视图,PageId_Setting);
		CLineLabel* Ctrl技能无色数=EasyCreateLineLabel(CID_冷却_技能无色数+i,BlockWidth-2,LabelHeight,L"test");
		Ctrl技能无色数->SetTextColor(0xFFFFFFFF);	
		Ctrl技能无色数->SetAlign('-');

		//Ctrl技能原始时间->SetBackColor(0x80FF0000);
		//Ctrl技能当前时间->SetBackColor(0x80FF0000);
		//Ctrl技能缩减率->SetBackColor(0x80FF0000);
		//Ctrl技能无色数->SetBackColor(0x80FF0000);
	}
}

void 重置设置_冷却详情面板()
{
	//完全由UpdateCalcResult()更新
}

void 退出清理_冷却详情面板()
{

}